home *** CD-ROM | disk | FTP | other *** search
/ PC Home 48 / Fun Clicp Art 5000.iso / r / mbm / 00797_SU-su bt part.ls < prev    next >
Encoding:
Text File  |  1996-05-11  |  2.8 KB  |  94 lines

  1. on MouseClick maLettre
  2.   global gNumSpr, g1erSprLoc, gBoutons, gEtudAct, gEtatEtud, gPartie, gCDpath, gSujet0, gSujet1, gSurvolPrec, gListPart, gListCod, gMessDef1, gMessDef2, gMessSty1, gMessSty2, gMol, gTraduit, gScopeSu, gPosVideo, gPosDebP, gPosDebS, gPosDebE, gPosFin
  3.   if maLettre = "T" then
  4.     if gEtatEtud = " " then
  5.       gBoutons(habille, g1erSprLoc + 12, "BTGMOL 0")
  6.       set gMol to 0
  7.       repeat with i = g1erSprLoc + 10 to g1erSprLoc + 12
  8.         set the visible of sprite i to 1
  9.       end repeat
  10.       set gPosVideo to 0
  11.       gScopeSu(Restore)
  12.       set en_lecture to 0
  13.     else
  14.       if gEtatEtud = "T" then
  15.         set oldNumSpr to g1erSprLoc + 9
  16.       else
  17.         if gEtatEtud = "C" then
  18.           set oldNumSpr to g1erSprLoc + 8
  19.         else
  20.           if gEtatEtud = "S" then
  21.             set oldNumSpr to g1erSprLoc + 7
  22.           else
  23.             if gEtatEtud = "B" then
  24.               set oldNumSpr to g1erSprLoc + 6
  25.             else
  26.               alert("gEtatEtud=" & gEtatEtud)
  27.             end if
  28.           end if
  29.         end if
  30.       end if
  31.       gBoutons(relache, oldNumSpr)
  32.       gBoutons(appuie, gNumSpr)
  33.       if gScopeSu(GetCadence) = 1 then
  34.         set en_lecture to 1
  35.         gScopeSu(SetCadence, 0)
  36.       else
  37.         set en_lecture to 0
  38.       end if
  39.       set maPos to gScopeSu(GetTime, 1)
  40.       set gPosVideo to gScopeSu(GetTime, 1) - gPosDebE - gPosDebS - gPosDebP
  41.     end if
  42.     set gEtatEtud to maLettre
  43.     set gPartie to maLettre
  44.     set gPosDebS to (getPos(gListCod, gSujet0(Le_Code)) - 1) * 300 * 4
  45.     set gPosDebP to (getPos(gListPart, gPartie) - 1) * 300
  46.     set gPosFin to gPosDebE + gPosDebS + gPosDebP + 239
  47.     gScopeSu(Box, 20, 92, 280, 256)
  48.     gScopeSu(SetTime, gPosDebE + gPosDebS + gPosDebP + gPosVideo)
  49.     gScopeSu(visible, 1)
  50.     if en_lecture = 1 then
  51.       gScopeSu(SetCadence, 1)
  52.     end if
  53.     set gSurvolPrec to -1
  54.     set gMessDef1 to getAt(gTraduit, 38)
  55.     set gMessDef2 to " "
  56.   else
  57.     gBoutons(relache, gNumSpr)
  58.     beep()
  59.     set gSurvolPrec to -1
  60.   end if
  61. end
  62.  
  63. on mouseDown
  64.   global gNumSpr, g1erSprLoc, gBoutons
  65.   set gNumSpr to -2
  66.   repeat with i = g1erSprLoc + 6 to g1erSprLoc + 9
  67.     if rollOver(i) then
  68.       set gNumSpr to i
  69.       exit repeat
  70.     end if
  71.   end repeat
  72.   if gNumSpr > 0 then
  73.     gBoutons(appuie, gNumSpr)
  74.   end if
  75. end
  76.  
  77. on mouseUp
  78.   global gNumSpr, g1erSprLoc, gBoutons, gEtudAct, gEtatEtud, gPartie, gCDpath, gSujet0, gSujet1, exitFrame, gSurvolPrec, gMessDef1, gMessDef2, gMessSty1, gMessSty2, gSprVideo1
  79.   curseur(1)
  80.   set monNumSpr to -2
  81.   repeat with i = g1erSprLoc + 6 to g1erSprLoc + 9
  82.     if rollOver(i) then
  83.       set monNumSpr to i
  84.       exit repeat
  85.     end if
  86.   end repeat
  87.   if (monNumSpr = gNumSpr) and (monNumSpr > 0) then
  88.     MouseClick(char 3 of the name of cast the castNum of sprite gNumSpr)
  89.   else
  90.     gBoutons(relache, gNumSpr)
  91.   end if
  92.   curseur(-1)
  93. end
  94.